package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.system.SysUserDto;
import com.atguigu.spzx.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

// mapper是mybatis的组件：spring不能直接管理，索引需要引入mybatis-spring包通过sqlSessionFactory整合
@Mapper
public interface SysUserMapper {
//    @Select("")
    SysUser findSysUserByUserName(String username);

    void deleteById(Long id);

    void save(@Param("sysUser") SysUser sysUser);

    SysUser getById(Long id);

    void updateById(@Param("sysUser")SysUser sysUser);

    List<SysUser> findPage(@Param("sysUserDto")SysUserDto sysUserDto);

    void batchDel(@Param("ids") List<Long> ids);
}
